Replacing Audio
Getting Started Before you begin you'll need the following: * PSARC Tool * Monkeyman's BNK Compiler ** Python version 3.2 and above * Wwise version 2016.1.2.5863 and above Optional: * Divinity Sound Converter (To convert WEMs into oggs if you'd like to preview the sounds) Unpacking Audio The first step to replacing Audio is unpacking it. If you haven't already unpacked the whole game you can unpack just the audio by using the PSARC Tool on NMSARC.5B11B94C.pak '''which contains all the audio. This is easily done by dragging said .pak file onto the '''PSARC Tool. Once finished 2 folders will be created. We will be using the AUDIO folder. Finding Which Sounds to Replace Once you have your files unpacked, you must find the correct IDs for the files you want to replace. One way is to open the .xml file for the .BNK file of the same name. For this tutorial we'll try to replace sounds from the NMS_AUDIO_PERSISTENT.BNK (This will be where the majority of sounds you'll want to replace will be). So we open NMS_AUDIO_PERSISTENT.xml in the text editor of your choice and use the search feature to locate a sound. In this case we'll choose the weapon melee sound (Wpn_Pl_Melee). Below is an example python BNKcompilerWCmd.py {BNK name(no extension)} {Source Path} {Output Path} {Mode(extract/recompile)} In this case I ran python BNKcompilerWCmd.py NMS_AUDIO_PERSISTENT ./tutorial ./tutorial extract. 'Your directory should now look like this Inside your specified Output Path will be all the sounds contained in the provided .BNK file. Converting to WEM Now that you have found the files you want to replace you're going to need files to replace them with. All sounds will have to be WEM and we achieve this by using Wwise. First create a Project in Wwise. Then you'll want to import all the sounds you want converted into a Wwise project. These sounds will have to be .wav files so convert them if they're not already. Once imported your files will appear inside of your project explorer. After that is done you will go back to the Project menu and click Convert All Audio Files... and hit Ok once the window appears. Once the conversion is complete you will find your WEM files in '"Documents\WwiseProjects\{Project Name}\.cache\Windows\SFX". Replacing The Sounds Now that all your sounds are converted into WEMs you'll want to rename them to the IDs we collected earlier. Each of your sounds should match the ID of a sound you are trying to replace. This is very important for Included files are there is no way to currently add new sounds and can mess up your mod if you do. If you are dealing with Streamed sounds you can skip the rest of this section Once you have renamed your WEM files you're going to return to your directory with the Python scripts. Copy all of your files into the Output Path your specified. Please note the amount of files being replaced should match the total files you're copying over. Once the files have been replaced you will run the python script again except this time with the recompile parameter. Example: python BNKcompilerWCmd.py NMS_AUDIO_PERSISTENT ./tutorial ./tutorial recompile This will recompile the BNK and make it ready to be packed. Packing the Mod Once you have your new WEMs (for streamed sounds) or recompiled BNKs (for included sounds) you are ready to pack your mod. Make a new folder called AUDIO and copy into it your WEMs or BNKs. Then drag the entire AUDIO folder into the PSARC Tool and it will pack them up into a psarc.pak file. Once this is finished you can rename it as you wish and place it in your Mods folder to test. Category:Tutorial